/* This is a big ugly forkbomb */

#include <sos.h>
#include <stdio.h>
#include <sel4/sel4.h>

int main(void) {
    int err;
    int i = 0;
    int pid = sos_my_id();
    while(1) {
        err = sos_process_create("execstack");
        printf("Child PID: %d\n", err);
        sos_process_wait(err);
    }

//     while (1) {
//         err = sos_process_create("forkbomb");
//         if (err < 0) {
//             printf("PID %d failed to fork! (%d)\n", pid, err);
//             return 1;
//         }
//         printf("PID %d is running, with %d children!\n", pid, i);
//         sos_sys_usleep(500000);
//     }
    return 0;
}
